Integrand size = 23, antiderivative size = 123 \[ \int \frac {\csc ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=-\frac {(3 a-2 b) \sqrt {b} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{2 (a+b)^{7/2} f}-\frac {(a-b) \cot (e+f x)}{(a+b)^3 f}-\frac {\cot ^3(e+f x)}{3 (a+b)^2 f}-\frac {a b \tan (e+f x)}{2 (a+b)^3 f \left (a+b+b \tan ^2(e+f x)\right )} \]
-(a-b)*cot(f*x+e)/(a+b)^3/f-1/3*cot(f*x+e)^3/(a+b)^2/f-1/2*(3*a-2*b)*arcta n(b^(1/2)*tan(f*x+e)/(a+b)^(1/2))*b^(1/2)/(a+b)^(7/2)/f-1/2*a*b*tan(f*x+e) /(a+b)^3/f/(a+b+b*tan(f*x+e)^2)
Result contains complex when optimal does not.
Time = 5.80 (sec) , antiderivative size = 303, normalized size of antiderivative = 2.46 \[ \int \frac {\csc ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\frac {(a+2 b+a \cos (2 (e+f x))) \sec ^4(e+f x) \left (-2 (a+b) (a+2 b+a \cos (2 (e+f x))) \cot (e) \csc ^2(e+f x)+\frac {3 (3 a-2 b) b \arctan \left (\frac {\sec (f x) (\cos (2 e)-i \sin (2 e)) (-((a+2 b) \sin (f x))+a \sin (2 e+f x))}{2 \sqrt {a+b} \sqrt {b (\cos (e)-i \sin (e))^4}}\right ) (a+2 b+a \cos (2 (e+f x))) (\cos (2 e)-i \sin (2 e))}{\sqrt {a+b} \sqrt {b (\cos (e)-i \sin (e))^4}}+4 (a-2 b) (a+2 b+a \cos (2 (e+f x))) \csc (e) \csc (e+f x) \sin (f x)+2 (a+b) (a+2 b+a \cos (2 (e+f x))) \csc (e) \csc ^3(e+f x) \sin (f x)-3 a b \sec (2 e) \sin (2 f x)+3 b (a+2 b) \tan (2 e)\right )}{24 (a+b)^3 f \left (a+b \sec ^2(e+f x)\right )^2} \]
((a + 2*b + a*Cos[2*(e + f*x)])*Sec[e + f*x]^4*(-2*(a + b)*(a + 2*b + a*Co s[2*(e + f*x)])*Cot[e]*Csc[e + f*x]^2 + (3*(3*a - 2*b)*b*ArcTan[(Sec[f*x]* (Cos[2*e] - I*Sin[2*e])*(-((a + 2*b)*Sin[f*x]) + a*Sin[2*e + f*x]))/(2*Sqr t[a + b]*Sqrt[b*(Cos[e] - I*Sin[e])^4])]*(a + 2*b + a*Cos[2*(e + f*x)])*(C os[2*e] - I*Sin[2*e]))/(Sqrt[a + b]*Sqrt[b*(Cos[e] - I*Sin[e])^4]) + 4*(a - 2*b)*(a + 2*b + a*Cos[2*(e + f*x)])*Csc[e]*Csc[e + f*x]*Sin[f*x] + 2*(a + b)*(a + 2*b + a*Cos[2*(e + f*x)])*Csc[e]*Csc[e + f*x]^3*Sin[f*x] - 3*a*b *Sec[2*e]*Sin[2*f*x] + 3*b*(a + 2*b)*Tan[2*e]))/(24*(a + b)^3*f*(a + b*Sec [e + f*x]^2)^2)
Time = 0.37 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.02, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4620, 361, 25, 1584, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\csc ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin (e+f x)^4 \left (a+b \sec (e+f x)^2\right )^2}dx\) |
\(\Big \downarrow \) 4620 |
\(\displaystyle \frac {\int \frac {\cot ^4(e+f x) \left (\tan ^2(e+f x)+1\right )}{\left (b \tan ^2(e+f x)+a+b\right )^2}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 361 |
\(\displaystyle \frac {-\frac {1}{2} b \int -\frac {\cot ^4(e+f x) \left (-\frac {a \tan ^4(e+f x)}{(a+b)^3}+\frac {2 a \tan ^2(e+f x)}{b (a+b)^2}+\frac {2}{b (a+b)}\right )}{b \tan ^2(e+f x)+a+b}d\tan (e+f x)-\frac {a b \tan (e+f x)}{2 (a+b)^3 \left (a+b \tan ^2(e+f x)+b\right )}}{f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {1}{2} b \int \frac {\cot ^4(e+f x) \left (-\frac {a \tan ^4(e+f x)}{(a+b)^3}+\frac {2 a \tan ^2(e+f x)}{b (a+b)^2}+\frac {2}{b (a+b)}\right )}{b \tan ^2(e+f x)+a+b}d\tan (e+f x)-\frac {a b \tan (e+f x)}{2 (a+b)^3 \left (a+b \tan ^2(e+f x)+b\right )}}{f}\) |
\(\Big \downarrow \) 1584 |
\(\displaystyle \frac {\frac {1}{2} b \int \left (\frac {2 \cot ^4(e+f x)}{b (a+b)^2}+\frac {2 (a-b) \cot ^2(e+f x)}{b (a+b)^3}+\frac {2 b-3 a}{(a+b)^3 \left (b \tan ^2(e+f x)+a+b\right )}\right )d\tan (e+f x)-\frac {a b \tan (e+f x)}{2 (a+b)^3 \left (a+b \tan ^2(e+f x)+b\right )}}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{2} b \left (-\frac {(3 a-2 b) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{\sqrt {b} (a+b)^{7/2}}-\frac {2 \cot ^3(e+f x)}{3 b (a+b)^2}-\frac {2 (a-b) \cot (e+f x)}{b (a+b)^3}\right )-\frac {a b \tan (e+f x)}{2 (a+b)^3 \left (a+b \tan ^2(e+f x)+b\right )}}{f}\) |
((b*(-(((3*a - 2*b)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(Sqrt[b]*( a + b)^(7/2))) - (2*(a - b)*Cot[e + f*x])/(b*(a + b)^3) - (2*Cot[e + f*x]^ 3)/(3*b*(a + b)^2)))/2 - (a*b*Tan[e + f*x])/(2*(a + b)^3*(a + b + b*Tan[e + f*x]^2)))/f
3.1.52.3.1 Defintions of rubi rules used
Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] : > Simp[(-a)^(m/2 - 1)*(b*c - a*d)*x*((a + b*x^2)^(p + 1)/(2*b^(m/2 + 1)*(p + 1))), x] + Simp[1/(2*b^(m/2 + 1)*(p + 1)) Int[x^m*(a + b*x^2)^(p + 1)*E xpandToSum[2*b*(p + 1)*Together[(b^(m/2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d)*x^(-m + 2))/(a + b*x^2)] - ((-a)^(m/2 - 1)*(b*c - a*d))/x^m, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && ILtQ[m/ 2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])
Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + ( c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(f*x)^m*(d + e*x^2)^q* (a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, q}, x] && NeQ[ b^2 - 4*a*c, 0] && IGtQ[p, 0] && IGtQ[q, -2]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_ )]^(m_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff^(m + 1)/f Subst[Int[x^m*(ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p/(1 + f f^2*x^2)^(m/2 + 1)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && IntegerQ[n/2]
Time = 0.91 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.86
method | result | size |
derivativedivides | \(\frac {-\frac {b \left (\frac {a \tan \left (f x +e \right )}{2 a +2 b +2 b \tan \left (f x +e \right )^{2}}+\frac {\left (3 a -2 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 \sqrt {\left (a +b \right ) b}}\right )}{\left (a +b \right )^{3}}-\frac {1}{3 \left (a +b \right )^{2} \tan \left (f x +e \right )^{3}}-\frac {a -b}{\left (a +b \right )^{3} \tan \left (f x +e \right )}}{f}\) | \(106\) |
default | \(\frac {-\frac {b \left (\frac {a \tan \left (f x +e \right )}{2 a +2 b +2 b \tan \left (f x +e \right )^{2}}+\frac {\left (3 a -2 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 \sqrt {\left (a +b \right ) b}}\right )}{\left (a +b \right )^{3}}-\frac {1}{3 \left (a +b \right )^{2} \tan \left (f x +e \right )^{3}}-\frac {a -b}{\left (a +b \right )^{3} \tan \left (f x +e \right )}}{f}\) | \(106\) |
risch | \(\frac {i \left (9 a b \,{\mathrm e}^{8 i \left (f x +e \right )}-6 b^{2} {\mathrm e}^{8 i \left (f x +e \right )}+12 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}+18 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+66 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+20 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}+44 a b \,{\mathrm e}^{4 i \left (f x +e \right )}-66 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+4 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}-18 a b \,{\mathrm e}^{2 i \left (f x +e \right )}+38 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}-4 a^{2}+11 a b \right )}{3 f \left (a +b \right )^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{3} \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )}+\frac {3 \sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right ) a}{4 \left (a +b \right )^{4} f}-\frac {\sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right ) b}{2 \left (a +b \right )^{4} f}-\frac {3 \sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right ) a}{4 \left (a +b \right )^{4} f}+\frac {\sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right ) b}{2 \left (a +b \right )^{4} f}\) | \(431\) |
1/f*(-1/(a+b)^3*b*(1/2*a*tan(f*x+e)/(a+b+b*tan(f*x+e)^2)+1/2*(3*a-2*b)/((a +b)*b)^(1/2)*arctan(b*tan(f*x+e)/((a+b)*b)^(1/2)))-1/3/(a+b)^2/tan(f*x+e)^ 3-(a-b)/(a+b)^3/tan(f*x+e))
Leaf count of result is larger than twice the leaf count of optimal. 288 vs. \(2 (109) = 218\).
Time = 0.31 (sec) , antiderivative size = 663, normalized size of antiderivative = 5.39 \[ \int \frac {\csc ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\left [-\frac {4 \, {\left (4 \, a^{2} - 11 \, a b\right )} \cos \left (f x + e\right )^{5} - 8 \, {\left (3 \, a^{2} - 8 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left ({\left (3 \, a^{2} - 2 \, a b\right )} \cos \left (f x + e\right )^{4} - {\left (3 \, a^{2} - 5 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 3 \, a b + 2 \, b^{2}\right )} \sqrt {-\frac {b}{a + b}} \log \left (\frac {{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 4 \, {\left ({\left (a^{2} + 3 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - {\left (a b + b^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {-\frac {b}{a + b}} \sin \left (f x + e\right ) + b^{2}}{a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}}\right ) \sin \left (f x + e\right ) - 12 \, {\left (3 \, a b - 2 \, b^{2}\right )} \cos \left (f x + e\right )}{24 \, {\left ({\left (a^{4} + 3 \, a^{3} b + 3 \, a^{2} b^{2} + a b^{3}\right )} f \cos \left (f x + e\right )^{4} - {\left (a^{4} + 2 \, a^{3} b - 2 \, a b^{3} - b^{4}\right )} f \cos \left (f x + e\right )^{2} - {\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} f\right )} \sin \left (f x + e\right )}, -\frac {2 \, {\left (4 \, a^{2} - 11 \, a b\right )} \cos \left (f x + e\right )^{5} - 4 \, {\left (3 \, a^{2} - 8 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - 3 \, {\left ({\left (3 \, a^{2} - 2 \, a b\right )} \cos \left (f x + e\right )^{4} - {\left (3 \, a^{2} - 5 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 3 \, a b + 2 \, b^{2}\right )} \sqrt {\frac {b}{a + b}} \arctan \left (\frac {{\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - b\right )} \sqrt {\frac {b}{a + b}}}{2 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) - 6 \, {\left (3 \, a b - 2 \, b^{2}\right )} \cos \left (f x + e\right )}{12 \, {\left ({\left (a^{4} + 3 \, a^{3} b + 3 \, a^{2} b^{2} + a b^{3}\right )} f \cos \left (f x + e\right )^{4} - {\left (a^{4} + 2 \, a^{3} b - 2 \, a b^{3} - b^{4}\right )} f \cos \left (f x + e\right )^{2} - {\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} f\right )} \sin \left (f x + e\right )}\right ] \]
[-1/24*(4*(4*a^2 - 11*a*b)*cos(f*x + e)^5 - 8*(3*a^2 - 8*a*b + 4*b^2)*cos( f*x + e)^3 + 3*((3*a^2 - 2*a*b)*cos(f*x + e)^4 - (3*a^2 - 5*a*b + 2*b^2)*c os(f*x + e)^2 - 3*a*b + 2*b^2)*sqrt(-b/(a + b))*log(((a^2 + 8*a*b + 8*b^2) *cos(f*x + e)^4 - 2*(3*a*b + 4*b^2)*cos(f*x + e)^2 - 4*((a^2 + 3*a*b + 2*b ^2)*cos(f*x + e)^3 - (a*b + b^2)*cos(f*x + e))*sqrt(-b/(a + b))*sin(f*x + e) + b^2)/(a^2*cos(f*x + e)^4 + 2*a*b*cos(f*x + e)^2 + b^2))*sin(f*x + e) - 12*(3*a*b - 2*b^2)*cos(f*x + e))/(((a^4 + 3*a^3*b + 3*a^2*b^2 + a*b^3)*f *cos(f*x + e)^4 - (a^4 + 2*a^3*b - 2*a*b^3 - b^4)*f*cos(f*x + e)^2 - (a^3* b + 3*a^2*b^2 + 3*a*b^3 + b^4)*f)*sin(f*x + e)), -1/12*(2*(4*a^2 - 11*a*b) *cos(f*x + e)^5 - 4*(3*a^2 - 8*a*b + 4*b^2)*cos(f*x + e)^3 - 3*((3*a^2 - 2 *a*b)*cos(f*x + e)^4 - (3*a^2 - 5*a*b + 2*b^2)*cos(f*x + e)^2 - 3*a*b + 2* b^2)*sqrt(b/(a + b))*arctan(1/2*((a + 2*b)*cos(f*x + e)^2 - b)*sqrt(b/(a + b))/(b*cos(f*x + e)*sin(f*x + e)))*sin(f*x + e) - 6*(3*a*b - 2*b^2)*cos(f *x + e))/(((a^4 + 3*a^3*b + 3*a^2*b^2 + a*b^3)*f*cos(f*x + e)^4 - (a^4 + 2 *a^3*b - 2*a*b^3 - b^4)*f*cos(f*x + e)^2 - (a^3*b + 3*a^2*b^2 + 3*a*b^3 + b^4)*f)*sin(f*x + e))]
\[ \int \frac {\csc ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\int \frac {\csc ^{4}{\left (e + f x \right )}}{\left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2}}\, dx \]
Time = 0.27 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.57 \[ \int \frac {\csc ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=-\frac {\frac {3 \, {\left (3 \, a b - 2 \, b^{2}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \sqrt {{\left (a + b\right )} b}} + \frac {3 \, {\left (3 \, a b - 2 \, b^{2}\right )} \tan \left (f x + e\right )^{4} + 2 \, {\left (3 \, a^{2} + a b - 2 \, b^{2}\right )} \tan \left (f x + e\right )^{2} + 2 \, a^{2} + 4 \, a b + 2 \, b^{2}}{{\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} \tan \left (f x + e\right )^{5} + {\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} \tan \left (f x + e\right )^{3}}}{6 \, f} \]
-1/6*(3*(3*a*b - 2*b^2)*arctan(b*tan(f*x + e)/sqrt((a + b)*b))/((a^3 + 3*a ^2*b + 3*a*b^2 + b^3)*sqrt((a + b)*b)) + (3*(3*a*b - 2*b^2)*tan(f*x + e)^4 + 2*(3*a^2 + a*b - 2*b^2)*tan(f*x + e)^2 + 2*a^2 + 4*a*b + 2*b^2)/((a^3*b + 3*a^2*b^2 + 3*a*b^3 + b^4)*tan(f*x + e)^5 + (a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4)*tan(f*x + e)^3))/f
Time = 0.39 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.50 \[ \int \frac {\csc ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=-\frac {\frac {3 \, a b \tan \left (f x + e\right )}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} {\left (b \tan \left (f x + e\right )^{2} + a + b\right )}} + \frac {3 \, {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right )\right )} {\left (3 \, a b - 2 \, b^{2}\right )}}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \sqrt {a b + b^{2}}} + \frac {2 \, {\left (3 \, a \tan \left (f x + e\right )^{2} - 3 \, b \tan \left (f x + e\right )^{2} + a + b\right )}}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (f x + e\right )^{3}}}{6 \, f} \]
-1/6*(3*a*b*tan(f*x + e)/((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*(b*tan(f*x + e)^ 2 + a + b)) + 3*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b + b^2)))*(3*a*b - 2*b^2)/((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*sqrt (a*b + b^2)) + 2*(3*a*tan(f*x + e)^2 - 3*b*tan(f*x + e)^2 + a + b)/((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*tan(f*x + e)^3))/f
Time = 19.58 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.15 \[ \int \frac {\csc ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=-\frac {\frac {1}{3\,\left (a+b\right )}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (3\,a-2\,b\right )}{3\,{\left (a+b\right )}^2}+\frac {b\,{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (3\,a-2\,b\right )}{2\,{\left (a+b\right )}^3}}{f\,\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^5+\left (a+b\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3\right )}-\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {b}\,\mathrm {tan}\left (e+f\,x\right )\,\left (a^3+3\,a^2\,b+3\,a\,b^2+b^3\right )}{{\left (a+b\right )}^{7/2}}\right )\,\left (3\,a-2\,b\right )}{2\,f\,{\left (a+b\right )}^{7/2}} \]